﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Web.Controls
{
    public class EventsComparer : ComparerBase<EventBase>
    {
        internal override bool AllowedTypes(Type type)
        {
            bool retValue = false;

            Type[] m_types = new Type[] { typeof(Xhr), 
                                          typeof(PreXhr),
                                          typeof(CreatedRow)};

            if (m_types.Contains(type)) retValue = true;

            return retValue;
        }

        internal override bool CheckDuplicates(Type type)
        {
            return (
                      type.Equals(typeof(CreatedRow)) ||
                      type.Equals(typeof(Xhr)) ||
                      type.Equals(typeof(PreXhr))
                   );
        }
    }
}
